<meta charset="UTF-8">
<div id="d1"></div>
<script>
    //setInterval 定时器

    d1.innerHTML = new Date();
    function f1(){
        d1.innerHTML = new Date();
    }

    //每隔3秒执行一次f1
    setInterval(f1,1000);
</script>
